package model.aula;

import model.pessoa.Socio;

public class Matricula {

	private Long id;
	private Socio socio;
	private Aula aula;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Socio getSocio() {
		return socio;
	}

	public void setSocio(Socio socio) {
		this.socio = socio;
	}

	public Aula getAula() {
		return aula;
	}

	public void setAula(Aula aula) {
		this.aula = aula;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((aula == null) ? 0 : aula.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((socio == null) ? 0 : socio.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Matricula other = (Matricula) obj;
		if (aula == null) {
			if (other.aula != null)
				return false;
		} else if (!aula.equals(other.aula))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (socio == null) {
			if (other.socio != null)
				return false;
		} else if (!socio.equals(other.socio))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Matricula [id=" + id + ", socio=" + socio + ", aula=" + aula
				+ "]";
	}

	public Matricula(Long id, Socio socio, Aula aula) {
		super();
		this.id = id;
		this.socio = socio;
		this.aula = aula;
	}

	public Matricula(Socio socio, Aula aula) {
		super();
		this.socio = socio;
		this.aula = aula;
	}

	public Matricula() {
		super();
	}

}
